home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
RTPC10
/
BLANK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-22
|
4KB
|
86 lines
{
┌────────┬──────────────────────────────────────────────────────┐
│Name │ BLANK.PAS │
├────────┼──────────────────────────────────────────────────────┤
│Use │ Just an example program for TP6 and above. │
│ │ A TSR that blanks the screen after inactivity │
├────────┼──────────────────────────────────────────────────────┤
│By │ Rafe Aldridge - (C) Copyright 1993 │
└────────┴──────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ Please realise that this program present's an idea. No claim │
│ is made that it is well written or cannot be improved upon │
└───────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ Rafe's TP Collection is SHAREWARE │
├───────────────────────────────────────────────────────────────┤
│ │
│ If you find any part of Rafe's TP Collection usefull then │
│ please become a registered user by sending 10 Pounds Sterling │
│ to the address below. In return you will recieve the LATEST │
│ FULL source code to ALL the units as well anything new. │
│ │
│ Please feel free to write with suggestions, ideas or money to │
│ Rafe Aldridge, │
│ Street Farm, │
│ Dereham Road, │
│ Garvestone, │
│ Norfolk. │
│ NR9 4QT │
│ ENGLAND │
│ │
└───────────────────────────────────────────────────────────────┘
}
{ ---------------------------------------------------------------------- }
{ NOTES: }
{ o A TP interrupt proc disables interrupts. Hence the need for an STI. }
{ o An interrupt proc must not last more than 50mS. If it will last }
{ longer then a busy flag must be used to stop recursion. }
{ ---------------------------------------------------------------------- }
{$M 1524,0,0} { preserve some memory for the TSR }
{$R-,S-,D-,L-,F-}
uses dos,vga;
var cnt : word; { count reached }
keyb_vec : pointer;
tim_vec : pointer;
procedure keyboard; interrupt; { replacement keyboard handler }
begin
asm { call the old int handler }
pushf
call dword ptr keyb_vec
end;
if cnt>2000 then VGAOn; { if the screen was off turn it on }
cnt:=0; { reset count }
asm
STI { enable interrupts }
end;
end;
procedure clock; interrupt;
begin
asm { call the old int handler }
pushf
call dword ptr tim_vec
end;
if cnt>2000 then VGAOff; { if the count has been reached switch of screen }
inc (cnt,1); { increment the counter }
asm
STI { enable interrupts }
end;
end;
begin
getintvec (9,keyb_vec);
getintvec (8,tim_vec);
setintvec (9,@keyboard);
setintvec (8,@clock);
cnt:=0;
keep(0);
end.